package com.wk.colorprogressbar;
import androidx.appcompat.app.AppCompatActivity;
import android.os.Bundle;
import android.widget.SeekBar;

public class MainActivity extends AppCompatActivity {

    SeekBar seekbar ;
    ColorProgressViewHorizontal colorProgressViewHorizontal ;
    ColorProgressViewVertical colorProgressViewVertical ;


    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);

        colorProgressViewHorizontal = findViewById(R.id.progressViewHorizontal) ;
        colorProgressViewHorizontal.setMaxCount(100);

        colorProgressViewVertical = findViewById(R.id.progressViewVertical) ;
        colorProgressViewVertical.setMaxCount(100);


        seekbar= findViewById(R.id.seekbar) ;
        seekbar.setOnSeekBarChangeListener(new SeekBar.OnSeekBarChangeListener() {
            @Override
            public void onProgressChanged(SeekBar seekBar, int i, boolean b) {
                colorProgressViewHorizontal.setCurrentCount(i);
                colorProgressViewVertical.setCurrentCount(i);
            }

            @Override
            public void onStartTrackingTouch(SeekBar seekBar) {

            }

            @Override
            public void onStopTrackingTouch(SeekBar seekBar) {

            }
        });



    }


}
